Create a pattern of squares based on the image